package br.com.datatraffic.fiscal.entidades;

// Generated 10/07/2009 10:49:54 by Hibernate Tools 3.2.0.b9

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * VeiculoCuidadoEspecial generated by hbm2java
 */
@Entity
@Table(name = "TBTICKET_MOTIVO")
public class TicketMotivo implements java.io.Serializable {

	private Long id;
	private Ticket5 ticket;
	private Motivo motivo;

	public TicketMotivo() {
	}

	public TicketMotivo(Long id, Ticket5 ticket, Motivo motivo) {
		this.id = id;
		this.ticket = ticket;
		this.motivo = motivo;
	}

	@Id
	@SequenceGenerator(name = "SQ_TBTICKET_MOTIVO", sequenceName = "SQ_TBTICKET_MOTIVO", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SQ_TBTICKET_MOTIVO")
	@Column(name = "TICKET_MOTIVO_ID", unique = true, nullable = false, precision = 38, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TICKET_ID", nullable = false)
	public Ticket5 getTicket() {
		return ticket;
	}

	public void setTicket(Ticket5 ticket) {
		this.ticket = ticket;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MOTIVO_ID")
	public Motivo getMotivo() {
		return motivo;
	}

	public void setMotivo(Motivo motivo) {
		this.motivo = motivo;
	}

	// The following is extra code specified in the hbm.xml files
	private static final long serialVersionUID = 1L;
	// end of extra code specified in the hbm.xml files

	
}